<%--
  Created by IntelliJ IDEA.
  User: Ryice
  Date: 2018/3/4
  Time: 16:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>
<html>
<head>
    <title>登录</title>
    <link rel="stylesheet" href="css/login.css" type="text/css" />
    <script type="text/javascript" src="js/jquery-3.3.1.js"></script>
    <script type="text/javascript" src="js/jquery.cookie.js"></script>
    <script type="text/javascript" src="js/login.js"></script>
</head>
<body>
<div class="logintop">
    <div class="logo_txt">
        <div class="logo">
            <i></i>
        </div>
        <div class="txt">
            <span>欢迎来到实验室</span>
        </div>
    </div>
    <div class="topabout">
        <ul>
            <li>
                    <span>
                        帮助
                    </span>
            </li>
            <li>
                    <span>
                        关于
                    </span>
            </li>
        </ul>
    </div>
</div>
<shiro:notAuthenticated>
    <div class="loginbody">
        <div class="loginbox">
            <div class="boxtop">
                <span>
                    用户登录
                </span>
            </div>
            <div class="userbox">
                <input id="username" name="username" type="text"  placeholder="用户名">
            </div>
            <div class="pwdbox">
                <input id="password" name="password" type="password" placeholder="密码">
            </div>
            <div class="codebox">
                <input id="authcode" name="authcode" type="text" placeholder="验证码">
            </div>
            <div class="subbtn">
                <input id="btn"  type="button" value="登录">
            </div>
            <div class="loginbottom">
                <span>
                    <a>注册</a>
                    <a>忘记密码</a>
                </span>

            </div>
        </div>
    </div>
</shiro:notAuthenticated>
<shiro:authenticated>
    <div class="mesdiv">
        <div id="messpan"></div>
    </div>
    <script type="text/javascript">
        (function(){
            var t = 6;
            var mes = "你已登录,五秒后跳转到首页...";
            var interval =  setInterval(function () {
                --t;
                $("#messpan").empty();
                $("#messpan").append(mes+t);
                if(t==0){
                    clearInterval(interval);
                    window.location.href = "./index.do?r="+Math.random();
                }
            },1000)
        })();
    </script>
</shiro:authenticated>
<div class="footer">
    <div class="copyriht">
            <span>
                &copy;yanghs
            </span>
    </div>
</div>
</body>
</html>
